import { expect } from 'chai';
import flat from '../src/flat.js';

describe('flat test suite', function () {
    it('should return empty array if argument is empty', function () {
        expect(flat()).to.eql([]);
    });

    it('should return empty array if input is empty array', function () {
        expect(flat([])).to.eql([]);
    });

    it('should return the same array if input is 1-dimension array', function () {
        expect(flat([1, 2, 3])).to.eql([1, 2, 3]);
    });

    it('should flat nested array if input is nested array', function () {
        expect(flat([1, [2, [3]]])).to.eql([1, 2, 3]);
    });
});
